﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Test Giao Dien/Test.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="Photocopy.Test_Giao_Dien.Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:TextBox ID="txtProName" CssClass="form-control" runat="server" Columns="60" placeholder="Nhập tên"></asp:TextBox>
    <div class="btn-insert-product">
        <asp:Button ID="btnInsertProduct" runat="server" CssClass="btn1" Text="Thêm sản phẩm" />
        <asp:Button runat="server" ID="btnReset" class="btn1" Text="Làm mới"></asp:Button>

    </div>
    <div id="dialog" style="display: none">
    </div>

    <script type="text/javascript">
        $(function(){
            $("#dialog").dialog({
                autoOpen: false,
                modal: true,
                title: "Details",
                buttons: {
                    Close: function () {
                        $(this).dialog('close');
                    }
                }
            });
            $("#btnInsertProduct").click(function () {
                $.ajax({
                    type: "POST",
                    url: "Home.aspx/SendSuccess",
                    data: "{name: '" + $("#txtProName").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (r) {
                        $("#dialog").html(r.d);
                        $("#dialog").dialog("open");
                    }
                });
            });
        });
    </script>

	<script src="js/jquery-1.8.3.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
 

</asp:Content>
